package com.leyou.item.mapper;

import com.leyou.common.mapper.BaseMapper;
import com.leyou.item.entity.Sku;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface SkuMapper extends BaseMapper<Sku> {

    @Update("UPDATE tb_sku SET stock=stock-#{count} WHERE id=#{skuId}")
    Integer minusStock(@Param("skuId") Long skuId, @Param("count")Integer count);
}
